The well-known Internet network is a notoriously well-known publicly-accessible communication network at the time of filing the present patent application, and arguably the most robust information and communication source ever made available. The Internet is used as a prime example in the present application of a data-packet-network which will benefit from the apparatus and methods taught in the present patent application, but is just one such network, following a particular standardized protocol. As is also very well known, the Internet (and related networks) are always a work in progress. That is, many researchers and developers are competing at all times to provide new and better apparatus and methods, including software, for enhancing the operation of such networks.
In general the most sought-after improvements in data packet networks are those that provide higher speed in routing (more packets per unit time) and better reliability and fidelity in messaging. What is generally needed are router apparatus and methods increasing the rates at which packets may be processed in a router.
As is well-known in the art, packet routers are computerized machines wherein data packets are received at any one or more of typically multiple ports, processed in some fashion, and sent out at the same or other ports of the router to continue on to downstream destinations. As an example of such computerized operations, keeping in mind that the Internet is a vast interconnected network of individual routers, individual routers have to keep track of which external routers to which they are connected by communication ports, and of which of alternate routes through the network are the best routes for incoming packets. Individual routers must also accomplish flow accounting, with a flow generally meaning a stream of packets with a common source and end destination. A general desire is that individual flows follow a common path. The skilled artisan will be aware of many such requirements for computerized processing.
Typically a router in the Internet network will have one or more Central Processing Units (CPUs) as dedicated microprocessors for accomplishing the many computing tasks required. In the current art at the time of the present application, these are single-streaming processors; that is, each processor is capable of processing a single stream of instructions. In some cases developers are applying multiprocessor technology to such routing operations. The present inventors have been involved for some time in development of dynamic multistreaming (DMS) processors, which processors are capable of simultaneously processing multiple instruction streams. One preferred application for such processors is in the processing of packets in packet networks like the Internet.
In a data-packet processor, a configurable queuing system for packet accounting during processing is known to the inventor and disclosure for same is referenced herein as Ser. No. 09/737,375 in the Cross-Reference section of this specification. The queuing and accounting system has a plurality of queues arranged in one or more clusters, an identification mechanism for creating a packet identifier for arriving packets, insertion logic for inserting packet identifiers into queues and for determining into which queue to insert a packet identifier, and selection logic for selecting packet identifiers from queues to initiate processing of identified packets, downloading of completed packets, or for re-queuing of the selected packet identifiers.
A portion of the memory in the above-described system is called packet memory. The packet memory is the memory where data packets reside before they can be downloaded by a packet management unit (PMU) to an output network interface (ONI) during packet processing and routing. A portion of the packet memory described above is called the local packet memory (LPM), and it is directly managed by hardware in the PMU instead of by software.
Whenever a data packet has been processed and is ready to be downloaded from LPM, the processing core or streaming processor unit (SPU) sends a command PKTDONE to the PMU. This command contains, among other information, a packet identifier (typically a number) of the packet that is ready to be downloaded. The PMU will then proceed with the download of this packet if it resides in LPM. If not, software operating through a system interface unit (SIU) will download the packet upon request.
Data packet processing occurs using context registers. In a dynamic multistreaming processor running eight streams, there are at least eight context registers for processing data packets. The context registers are located physically within the streaming processor core having associated therewith functional units required for processing. In this example, each context can have a state of either PMU-owned or SPU-owned. When information is being preloaded into a context the context is PMU-owned. When a stream is running within a context, the context is SPU-owned.
During packet processing wherein the SPU is executing instructions to process a data packet, it is possible that the data packet in process will be caused to grow (become larger) in terms of header data and/or tail data. Packet growth during SPU processing may cause the process to overwrite consecutively stored data packets information in memory. The problem presented by this possible growth phenomena is that in order to avoid a possible overwrite and data corruption issue, a packet that has outgrown its memory space must be moved during processing to a new memory space that is large enough (larger than before) to hold it in its expanded form. Repeated instances of this requirement over time tend to add more latency in packet processing. Therefore, what is clearly needed is a method for allocating enough memory space for a new packet to account for a possible growth in packet size during processing. A method such as this would sharply reduce packet move operations, and avoid overwrites in memory.